package lab;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

public class LiczbaTest {
	Liczba l;
	@Before
	public void setUp() throws Exception {
		l = new Liczba();
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testLiczba1(){
		l.set("FF", 16);
		assertEquals("255", l.get(10));
	}

	@Test
	public void testLiczba2(){
		l.set("111000", 2);
		assertTrue(l.get(8).equals("70"));
	}
	
	@Test
	public void testLiczba3(){
		l.set("144", 10);
		assertEquals("hello there, error here", "100", l.get(12));
	}
	
	@Test
	public void testLiczba4(){
		l.set("7F7F", 16);
		if(l.get(2).equals("111111101111111"))
			return;
		fail();
	}
	
	@Test
	public void testLiczba5(){
		assertNull(l.get(0));
	}
	
	@Test
	public void testLiczba17(){
		l.set("AG4", 17);
		assertEquals("AG4", l.get(17));
	}
	
	@Ignore
	public void testLiczba6(){
		fail();
	}

}
